import 'package:flutter/material.dart';
import 'package:getpro/getpro.dart';
import 'package:getx_base/main.dart';
import 'package:getx_base/pages/home_page/home_page.dart';
import 'package:getx_base/pages/user_page/user_page.dart';

import 'login_model.dart';

class LoginPage extends BasePageWidget<LoginPageModel>{
  final BasePageWidget? redirect;
  const LoginPage({Key? key,this.redirect}) : super(key: key);

  @override
  Widget buildChild(LoginPageModel model, BuildContext context) {
    return Center(
      child: TextButton(
        onPressed: (){
          Get.find<AppModel>().hasAuth.value = true;
          RouterPro.off(redirect??HomePage());
        },
        child: Text("login"),
      ),
    );
  }

  @override
  LoginPageModel get getModel => LoginPageModel();




}

